﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Game.templates.manor
{
    public class CropProcure
    {
        /**
         * Field _rewardType.
         */
        int _rewardType;
        /**
         * Field _cropId.
         */
        int _cropId;
        /**
         * Field _buyResidual.
         */
        long _buyResidual;
        /**
         * Field _buy.
         */
        long _buy;
        /**
         * Field _price.
         */
        long _price;

        /**
         * Constructor for CropProcure.
         * @param id int
         */
        public CropProcure(int id)
        {
            _cropId = id;
            _buyResidual = 0;
            _rewardType = 0;
            _buy = 0;
            _price = 0;
        }

        /**
         * Constructor for CropProcure.
         * @param id int
         * @param amount long
         * @param type int
         * @param buy long
         * @param price long
         */
        public CropProcure(int id, long amount, int type, long buy, long price)
        {
            _cropId = id;
            _buyResidual = amount;
            _rewardType = type;
            _buy = buy;
            _price = price;
            if (_price < 0L)
            {
                _price = 0L;
            }
        }

        /**
         * Method getReward.
         * @return int
         */
        public int getReward()
        {
            return _rewardType;
        }

        /**
         * Method getId.
         * @return int
         */
        public int getId()
        {
            return _cropId;
        }

        /**
         * Method getAmount.
         * @return long
         */
        public long getAmount()
        {
            return _buyResidual;
        }

        /**
         * Method getStartAmount.
         * @return long
         */
        public long getStartAmount()
        {
            return _buy;
        }

        /**
         * Method getPrice.
         * @return long
         */
        public long getPrice()
        {
            return _price;
        }

        /**
         * Method setAmount.
         * @param amount long
         */
        public void setAmount(long amount)
        {
            _buyResidual = amount;
        }
    }

}
